<!DOCTYPE html><html><head><title>留存分析</title><meta charset='utf-8'><link href='https://dn-maxiang.qbox.me/res-min/themes/marxico.css' rel='stylesheet'><style></style></head><body><div id='preview-contents' class='note-content'>
                        
                    

<h2 id="留存分析">留存分析</h2>

<blockquote>
  <p>共 <code>initParam</code> <code>search</code>  <code>search2</code> <code>updatePlatform</code> <code>updateChannel</code> <code>updateServer</code> <code>updatePlatform2</code> <code>updateChannel2</code> <code>updateServer2</code> 九个接口</p>
</blockquote>

<hr>



<h3 id="initparam"><code>initParam</code></h3>

<p><strong>接口说明</strong> </p>

<pre class="prettyprint hljs-dark"><code class="hljs 1c">请求条件初始化。注意：此页面有两组请求条件：一为留存趋势的查询条件，二为分职业留存的查询条件<br>两组查询条件里需要服务器初始化的请求条件都为平台、渠道、区服三个，下拉框默认值都为<span class="hljs-string">"0"</span><br>留存趋势中的开始和结束时间两个查询条件由前端自行初始化，分别为一周前和一天前，分职业留存中的时间查询条件也由前端自行初始化，为一天前<br></code></pre>

<p><strong>URL</strong></p>

<pre class="prettyprint hljs-dark"><code class="hljs crystal"><span class="hljs-symbol">http:</span>/<span class="hljs-regexp">/115.159.207.95:9080/player</span><span class="hljs-regexp">/alivePlayer/init</span>Param.<span class="hljs-keyword">do</span><br></code></pre>

<p><strong>请求参数</strong></p>

<pre class="prettyprint hljs-dark"><code class="hljs groovy"><span class="hljs-number">1.</span> <span class="hljs-string">callback :</span> <span class="hljs-string">""</span><br></code></pre>

<p><strong>返回参数</strong></p>

<pre class="prettyprint hljs-dark"><code class="hljs dts">{<br><span class="hljs-symbol">    res:</span> <span class="hljs-string">"0"</span>,<br><span class="hljs-symbol">    platformItmes:</span> {<br>        全平台: <span class="hljs-string">"0"</span>,<br><span class="hljs-symbol">        iOS:</span> <span class="hljs-string">"2"</span>,<br>        安卓: <span class="hljs-string">"3"</span>,<br>        通用: <span class="hljs-string">"9"</span><br>    },<br><span class="hljs-symbol">    channelItmes:</span> {<br>        全渠道: <span class="hljs-string">"0"</span>,<br>        <span class="hljs-number">360</span>: <span class="hljs-string">"83"</span>,<br>        百度: <span class="hljs-string">"13"</span><br>    },<br><span class="hljs-symbol">    serverItmes:</span> {<br>        全区服: <span class="hljs-string">"0"</span>,<br>        神谕<span class="hljs-number">1</span>区: <span class="hljs-string">"1002"</span>,<br>        神谕<span class="hljs-number">2</span>区: <span class="hljs-string">"1004"</span><br>    },<br><span class="hljs-symbol">    platformItmes2:</span> {<br>        全平台: <span class="hljs-string">"0"</span>,<br><span class="hljs-symbol">        iOS:</span> <span class="hljs-string">"2"</span>,<br>        安卓: <span class="hljs-string">"3"</span>,<br>        通用: <span class="hljs-string">"9"</span><br>    },<br><span class="hljs-symbol">    channelItmes2:</span> {<br>        全渠道: <span class="hljs-string">"0"</span>,<br>        <span class="hljs-number">360</span>: <span class="hljs-string">"83"</span>,<br>        百度: <span class="hljs-string">"13"</span><br>    },<br><span class="hljs-symbol">    serverItmes2:</span> {<br>        全区服: <span class="hljs-string">"0"</span>,<br>        神谕<span class="hljs-number">1</span>区: <span class="hljs-string">"1002"</span>,<br>        神谕<span class="hljs-number">2</span>区: <span class="hljs-string">"1004"</span><br>    }<br>}<br></code></pre>

<hr>

<h3 id="search"><code>search</code></h3>

<p><strong>接口说明</strong> </p>

<pre class="prettyprint hljs-dark"><code class="hljs">留存趋势的查询接口，点击留存趋势上面的查询和切换留存趋势类型时，会触发此接口。根据请求条件，查询并返回结果<br></code></pre>

<p><strong>URL</strong></p>

<pre class="prettyprint hljs-dark"><code class="hljs crystal"><span class="hljs-symbol">http:</span>/<span class="hljs-regexp">/115.159.207.95:9080/player</span><span class="hljs-regexp">/alivePlayer/search</span>.<span class="hljs-keyword">do</span><br></code></pre>

<p><strong>请求参数</strong></p>

<pre class="prettyprint hljs-dark"><code class="hljs axapta"><span class="hljs-number">1.</span> dstart : <span class="hljs-string">"2017-06-01"</span>       <span class="hljs-meta"># 开始时间 </span><br><span class="hljs-number">2.</span> dend : <span class="hljs-string">"2017-06-07"</span>         <span class="hljs-meta"># 结束时间</span><br><span class="hljs-number">3.</span> platform : <span class="hljs-string">"0"</span>              <span class="hljs-meta"># 平台    </span><br><span class="hljs-number">4.</span> channel : <span class="hljs-string">"0"</span>               <span class="hljs-meta"># 渠道</span><br><span class="hljs-number">5.</span> <span class="hljs-keyword">server</span> : <span class="hljs-string">"1001"</span>             <span class="hljs-meta"># 区服</span><br><span class="hljs-number">6.</span> selectedType  : <span class="hljs-string">"1"</span>         <span class="hljs-meta"># 选择的留存趋势类型：1=新增设备 2=新增帐号 3=活跃帐号 4=首付帐号</span><br><span class="hljs-number">7.</span> callback : <span class="hljs-string">""</span><br></code></pre>

<p><strong>返回参数</strong></p>

<pre class="prettyprint hljs-dark"><code class="hljs dts">{<br><span class="hljs-symbol">    res:</span> <span class="hljs-string">"0"</span>,<br><span class="hljs-symbol">    alivePlayerDatas:</span> [        <span class="hljs-meta"># 留存趋势数据列表</span><br>        {<br><span class="hljs-symbol">            dateStr:</span> <span class="hljs-string">"2016-05-18"</span>,   <span class="hljs-meta"># 日期串</span><br><span class="hljs-symbol">            platformId:</span> <span class="hljs-string">"0"</span>,         <span class="hljs-meta"># 平台</span><br><span class="hljs-symbol">            channelId:</span> <span class="hljs-string">"0"</span>,          <span class="hljs-meta"># 渠道</span><br><span class="hljs-symbol">            serverId:</span> <span class="hljs-string">"0"</span>,           <span class="hljs-meta"># 区服</span><br><span class="hljs-symbol">            newUser:</span> <span class="hljs-number">1502</span>,           <span class="hljs-meta"># 新增帐号</span><br><span class="hljs-symbol">            the2Left:</span> <span class="hljs-number">0</span>,             <span class="hljs-meta"># 次日留存</span><br><span class="hljs-symbol">            the3Left:</span> <span class="hljs-number">0</span>,             <span class="hljs-meta"># 3日留存</span><br><span class="hljs-symbol">            the4Left:</span> <span class="hljs-number">0</span>,             <span class="hljs-meta"># 4日留存</span><br><span class="hljs-symbol">            the5Left:</span> <span class="hljs-number">0</span>,             <span class="hljs-meta"># 5日留存</span><br><span class="hljs-symbol">            the6Left:</span> <span class="hljs-number">0</span>,             <span class="hljs-meta"># 6日留存</span><br><span class="hljs-symbol">            the7Left:</span> <span class="hljs-number">0</span>,             <span class="hljs-meta"># 7日留存</span><br><span class="hljs-symbol">            the14Left:</span> <span class="hljs-number">0</span>,            <span class="hljs-meta"># 14日留存</span><br><span class="hljs-symbol">            the30Left:</span> <span class="hljs-number">0</span>             <span class="hljs-meta"># 月留存</span><br>        },<br>        {<br><span class="hljs-symbol">            dateStr:</span> <span class="hljs-string">"2016-05-19"</span>,<br><span class="hljs-symbol">            newUser:</span> <span class="hljs-number">2989</span>,<br><span class="hljs-symbol">            the14Left:</span> <span class="hljs-number">0</span>,<br><span class="hljs-symbol">            the2Left:</span> <span class="hljs-number">0</span>,<br><span class="hljs-symbol">            the30Left:</span> <span class="hljs-number">0</span>,<br><span class="hljs-symbol">            the3Left:</span> <span class="hljs-number">0</span>,<br><span class="hljs-symbol">            the4Left:</span> <span class="hljs-number">0</span>,<br><span class="hljs-symbol">            the5Left:</span> <span class="hljs-number">0</span>,<br><span class="hljs-symbol">            the6Left:</span> <span class="hljs-number">0</span>,<br><span class="hljs-symbol">            the7Left:</span> <span class="hljs-number">0</span><br>        }<br>    ],<br><span class="hljs-symbol">    alivePlayerChart:</span> {        <span class="hljs-meta"># 留存趋势图表数据</span><br><span class="hljs-symbol">        jsonStr:</span> <span class="hljs-string">"{"</span>percent<span class="hljs-string">":1,"</span>columnkeys<span class="hljs-string">":["</span><span class="hljs-number">2016</span><span class="hljs-number">-05</span><span class="hljs-number">-18</span><span class="hljs-string">","</span><span class="hljs-number">2016</span><span class="hljs-number">-05</span><span class="hljs-number">-19</span><span class="hljs-string">"],"</span>minData<span class="hljs-string">":0,"</span>names<span class="hljs-string">":["</span>次日留存率<span class="hljs-string">","</span><span class="hljs-number">3</span>日留存率<span class="hljs-string">","</span><span class="hljs-number">7</span>日留存率<span class="hljs-string">"],"</span>maxData<span class="hljs-string">":0,"</span>data<span class="hljs-string">":[[0,0],[0,0],[0,0]],"</span>rowkeys<span class="hljs-string">":["</span>[日期]<span class="hljs-number">2016</span><span class="hljs-number">-05</span><span class="hljs-number">-18</span> - <span class="hljs-number">2016</span><span class="hljs-number">-05</span><span class="hljs-number">-19</span><span class="hljs-string">"],"</span>type<span class="hljs-string">":"</span>column<span class="hljs-string">"}"</span>    <span class="hljs-meta"># 图表json数据</span><br>    }<br>}<br></code></pre>

<hr>

<h3 id="search2"><code>search2</code></h3>

<p><strong>接口说明</strong> </p>

<pre class="prettyprint hljs-dark"><code class="hljs">分职业留存的查询接口，点击分职业留存的查询时，会触发此接口。根据请求条件，查询并返回结果<br></code></pre>

<p><strong>URL</strong></p>

<pre class="prettyprint hljs-dark"><code class="hljs crystal"><span class="hljs-symbol">http:</span>/<span class="hljs-regexp">/115.159.207.95:9080/player</span><span class="hljs-regexp">/alivePlayer/search</span>2.<span class="hljs-keyword">do</span><br></code></pre>

<p><strong>请求参数</strong></p>

<pre class="prettyprint hljs-dark"><code class="hljs axapta"><span class="hljs-number">1.</span> schoolDate: <span class="hljs-string">"2017-06-01"</span>       <span class="hljs-meta"># 查询时间 </span><br><span class="hljs-number">2.</span> platform : <span class="hljs-string">"0"</span>                 <span class="hljs-meta"># 平台    </span><br><span class="hljs-number">3.</span> channel : <span class="hljs-string">"0"</span>                  <span class="hljs-meta"># 渠道</span><br><span class="hljs-number">4.</span> <span class="hljs-keyword">server</span> : <span class="hljs-string">"1001"</span>                <span class="hljs-meta"># 区服</span><br><span class="hljs-number">5.</span> callback : <span class="hljs-string">""</span><br></code></pre>

<p><strong>返回参数</strong></p>

<pre class="prettyprint hljs-dark"><code class="hljs dts">{<br><span class="hljs-symbol">    res:</span> <span class="hljs-string">"0"</span>,<br><span class="hljs-symbol">    alivePlayerDatas:</span> [        <span class="hljs-meta"># 分职业留存数据列表</span><br>        {<br><span class="hljs-symbol">            dateStr:</span> <span class="hljs-string">"2016-05-18"</span>,   <span class="hljs-meta"># 日期串</span><br><span class="hljs-symbol">            platformId:</span> <span class="hljs-string">"0"</span>,         <span class="hljs-meta"># 平台</span><br><span class="hljs-symbol">            channelId:</span> <span class="hljs-string">"0"</span>,          <span class="hljs-meta"># 渠道</span><br><span class="hljs-symbol">            serverId:</span> <span class="hljs-string">"0"</span>,           <span class="hljs-meta"># 区服</span><br><span class="hljs-symbol">            newUser:</span> <span class="hljs-number">1502</span>,           <span class="hljs-meta"># 新增帐号</span><br><span class="hljs-symbol">            the2Left:</span> <span class="hljs-number">0</span>,             <span class="hljs-meta"># 次日留存</span><br><span class="hljs-symbol">            the3Left:</span> <span class="hljs-number">0</span>,             <span class="hljs-meta"># 3日留存</span><br><span class="hljs-symbol">            the4Left:</span> <span class="hljs-number">0</span>,             <span class="hljs-meta"># 4日留存</span><br><span class="hljs-symbol">            the5Left:</span> <span class="hljs-number">0</span>,             <span class="hljs-meta"># 5日留存</span><br><span class="hljs-symbol">            the6Left:</span> <span class="hljs-number">0</span>,             <span class="hljs-meta"># 6日留存</span><br><span class="hljs-symbol">            the7Left:</span> <span class="hljs-number">0</span>,             <span class="hljs-meta"># 7日留存</span><br><span class="hljs-symbol">            the14Left:</span> <span class="hljs-number">0</span>,            <span class="hljs-meta"># 14日留存</span><br><span class="hljs-symbol">            the30Left:</span> <span class="hljs-number">0</span>             <span class="hljs-meta"># 月留存</span><br>        },<br>        {<br><span class="hljs-symbol">            dateStr:</span> <span class="hljs-string">"2016-05-19"</span>,<br><span class="hljs-symbol">            newUser:</span> <span class="hljs-number">2989</span>,<br><span class="hljs-symbol">            the14Left:</span> <span class="hljs-number">0</span>,<br><span class="hljs-symbol">            the2Left:</span> <span class="hljs-number">0</span>,<br><span class="hljs-symbol">            the30Left:</span> <span class="hljs-number">0</span>,<br><span class="hljs-symbol">            the3Left:</span> <span class="hljs-number">0</span>,<br><span class="hljs-symbol">            the4Left:</span> <span class="hljs-number">0</span>,<br><span class="hljs-symbol">            the5Left:</span> <span class="hljs-number">0</span>,<br><span class="hljs-symbol">            the6Left:</span> <span class="hljs-number">0</span>,<br><span class="hljs-symbol">            the7Left:</span> <span class="hljs-number">0</span><br>        }<br>    ],<br><span class="hljs-symbol">    alivePlayerChart:</span> {        <span class="hljs-meta"># 分职业留存图表数据</span><br><span class="hljs-symbol">        jsonStr:</span> <span class="hljs-string">"{"</span>percent<span class="hljs-string">":1,"</span>columnkeys<span class="hljs-string">":["</span><span class="hljs-number">2016</span><span class="hljs-number">-05</span><span class="hljs-number">-18</span><span class="hljs-string">","</span><span class="hljs-number">2016</span><span class="hljs-number">-05</span><span class="hljs-number">-19</span><span class="hljs-string">"],"</span>minData<span class="hljs-string">":0,"</span>names<span class="hljs-string">":["</span>次日留存率<span class="hljs-string">","</span><span class="hljs-number">3</span>日留存率<span class="hljs-string">","</span><span class="hljs-number">7</span>日留存率<span class="hljs-string">"],"</span>maxData<span class="hljs-string">":0,"</span>data<span class="hljs-string">":[[0,0],[0,0],[0,0]],"</span>rowkeys<span class="hljs-string">":["</span>[日期]<span class="hljs-number">2016</span><span class="hljs-number">-05</span><span class="hljs-number">-18</span> - <span class="hljs-number">2016</span><span class="hljs-number">-05</span><span class="hljs-number">-19</span><span class="hljs-string">"],"</span>type<span class="hljs-string">":"</span>column<span class="hljs-string">"}"</span>    <span class="hljs-meta"># 图表json数据</span><br>    }<br>}<br></code></pre>

<hr>

<h3 id="updateplatform-updateplatform2"><code>updatePlatform</code> <code>updatePlatform2</code></h3>

<p><strong>接口说明</strong> </p>

<pre class="prettyprint hljs-dark"><code class="hljs">这两个接口的请求参数与返回参数都一样，因此放在一处说明。前者是在留存趋势处选择某平台时触发的操作，后者是在分职业留存处选择某平台时触发的操作。根据选中的平台，查询并返回新的渠道和区服列表，以供前端更新各自所在处的对应数据<br></code></pre>

<p><strong>URL</strong></p>

<pre class="prettyprint hljs-dark"><code class="hljs crystal"><span class="hljs-symbol">http:</span>/<span class="hljs-regexp">/115.159.207.95:9080/player</span><span class="hljs-regexp">/alivePlayer/update</span>Platform.<span class="hljs-keyword">do</span><br><span class="hljs-symbol">http:</span>/<span class="hljs-regexp">/115.159.207.95:9080/player</span><span class="hljs-regexp">/alivePlayer/update</span>Platform2.<span class="hljs-keyword">do</span><br></code></pre>

<p><strong>请求参数</strong></p>

<pre class="prettyprint hljs-dark"><code class="hljs livecodeserver"><span class="hljs-number">1.</span>  <span class="hljs-built_in">platform</span>： <span class="hljs-string">"2"</span>    <span class="hljs-comment"># 选中的平台</span><br><span class="hljs-number">2.</span>  callback : <span class="hljs-string">""</span><br></code></pre>

<p><strong>返回参数</strong></p>

<pre class="prettyprint hljs-dark"><code class="hljs clojure">{<br>    res: <span class="hljs-string">"0"</span>,<br>    channelItmes: {<br>        全渠道: <span class="hljs-string">"0"</span><br>    },<br>    serverItmes: {<br>        全区服: <span class="hljs-string">"0"</span><br>    }<br>}<br></code></pre>

<hr>

<h3 id="updatechannel-updatechannel2"><code>updateChannel</code> <code>updateChannel2</code></h3>

<p><strong>接口说明</strong> </p>

<pre class="prettyprint hljs-dark"><code class="hljs">这两个接口的请求参数与返回参数都一样，因此放在一处说明。前者是在留存趋势处选择某渠道时触发的操作，后者是在分职业留存处选择某渠道时触发的操作。根据选中的渠道，查询并返回新的平台和区服列表，以供前端更新各自所在处的对应数据<br></code></pre>

<p><strong>URL</strong></p>

<pre class="prettyprint hljs-dark"><code class="hljs crystal"><span class="hljs-symbol">http:</span>/<span class="hljs-regexp">/115.159.207.95:9080/player</span><span class="hljs-regexp">/alivePlayer/update</span>Channel.<span class="hljs-keyword">do</span><br><span class="hljs-symbol">http:</span>/<span class="hljs-regexp">/115.159.207.95:9080/player</span><span class="hljs-regexp">/alivePlayer/update</span>Channel2.<span class="hljs-keyword">do</span><br></code></pre>

<p><strong>请求参数</strong></p>

<pre class="prettyprint hljs-dark"><code class="hljs 1c"><span class="hljs-number">1</span>.  channel： <span class="hljs-string">"2"</span>    <span class="hljs-meta"># 选中的渠道</span><br><span class="hljs-number">2</span>.  callback : <span class="hljs-string">""</span><br></code></pre>

<p><strong>返回参数</strong></p>

<pre class="prettyprint hljs-dark"><code class="hljs clojure">{<br>    res: <span class="hljs-string">"0"</span>,<br>    platformItmes: {<br>        全平台: <span class="hljs-string">"0"</span><br>    },<br>    serverItmes: {<br>        全区服: <span class="hljs-string">"0"</span><br>    }<br>}<br></code></pre>

<hr>

<h3 id="updateserver-updateserver2"><code>updateServer</code> <code>updateServer2</code></h3>

<p><strong>接口说明</strong> </p>

<pre class="prettyprint hljs-dark"><code class="hljs">这两个接口的请求参数与返回参数都一样，因此放在一处说明。前者是在留存趋势处选择某区服时触发的操作，后者是在分职业留存处选择某区服时触发的操作。根据选中的区服，查询并返回新的平台和渠道列表，以供前端更新各自所在处的对应数据<br></code></pre>

<p><strong>URL</strong></p>

<pre class="prettyprint hljs-dark"><code class="hljs crystal"><span class="hljs-symbol">http:</span>/<span class="hljs-regexp">/115.159.207.95:9080/player</span><span class="hljs-regexp">/alivePlayer/update</span>Server.<span class="hljs-keyword">do</span><br><span class="hljs-symbol">http:</span>/<span class="hljs-regexp">/115.159.207.95:9080/player</span><span class="hljs-regexp">/alivePlayer/update</span>Server2.<span class="hljs-keyword">do</span><br></code></pre>

<p><strong>请求参数</strong></p>

<pre class="prettyprint hljs-dark"><code class="hljs axapta"><span class="hljs-number">1.</span>  <span class="hljs-keyword">server</span>： <span class="hljs-string">"1002"</span>    <span class="hljs-meta"># 选中的区服</span><br><span class="hljs-number">2.</span>  callback : <span class="hljs-string">""</span><br></code></pre>

<p><strong>返回参数</strong></p>

<pre class="prettyprint hljs-dark"><code class="hljs clojure">{<br>    res: <span class="hljs-string">"0"</span>,<br>    platformItmes: {<br>        全渠道: <span class="hljs-string">"0"</span><br>    },<br>    channelItmes: {<br>        全渠道: <span class="hljs-string">"0"</span><br>    }<br>}<br></code></pre></div></body></html>